﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace PrintPack
{
    public partial class Frmtest : Form
    {
        public Frmtest()
        {
            InitializeComponent();
        }

        private void Frmtest_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'fFCPackingDataSet.T_Information' table. You can move, or remove it, as needed.
            this.t_InformationTableAdapter.Fill(this.fFCPackingDataSet.T_Information);
            // TODO: This line of code loads data into the 'fFCPackingDataSet.T_Information' table. You can move, or remove it, as needed.
            this.t_InformationTableAdapter.Fill(this.fFCPackingDataSet.T_Information);
            // TODO: This line of code loads data into the 'fFCPackingDataSet.ame_GetBoxNumber' table. You can move, or remove it, as needed.
            this.ame_GetBoxNumberTableAdapter.Fill(this.fFCPackingDataSet.ame_GetBoxNumber);

        }

        private void fillToolStripButton_Click(object sender, EventArgs e)
        {
            try
            {
                this.ame_GetSAPDescriptionTableAdapter.Fill(this.fFCPackingDataSet.ame_GetSAPDescription, sAPModelToolStripTextBox.Text);
            }
            catch (System.Exception ex)
            {
                System.Windows.Forms.MessageBox.Show(ex.Message);
            }

        }

        private void fillToolStripButton1_Click(object sender, EventArgs e)
        {
            try
            {
                this.pullSNbyBOXTableAdapter.Fill(this.fFCPackingDataSet.PullSNbyBOX, boxnumberToolStripTextBox.Text);
            }
            catch (System.Exception ex)
            {
                System.Windows.Forms.MessageBox.Show(ex.Message);
            }

        }

        private void t_InformationBindingNavigatorSaveItem_Click(object sender, EventArgs e)
        {
            this.Validate();
            this.t_InformationBindingSource.EndEdit();
            this.tableAdapterManager.UpdateAll(this.fFCPackingDataSet);

        }
    }
}
